home *** CD-ROM | disk | FTP | other *** search
- Path: isonews.bbn.hp.com!hpbblb!news
- From: Matthias Dittrich <matti>
- Newsgroups: comp.lang.c++
- Subject: Re: Templates as the type of a template
- Date: 18 Apr 1996 16:55:03 GMT
- Organization: Hewlett-Packard Co.
- Message-ID: <4l5s57$1kc@hpbblb.bbn.hp.com>
- References: <316D1587.167EB0E7@kainos.com>
- NNTP-Posting-Host: trabant.bbn.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
- X-URL: news:316D1587.167EB0E7@kainos.com
-
- Andrew Palmer <a.palmer@kainos.com> wrote:
- >Hello,
- >
- > I'm using Sun's CC compiler from Sparcworks 3.0.1 and I'm having a
- >little trouble passing a template class as the type of another template
- >class.
- >
- > I have one template class called "list" and I can use "list<int> foo"
- >fine.
- > I have another template class called "vector" and I can use
- >"vector<int> bar;" fine as well.
- >
- > But I don't seem to be able to have a list of vectors of type int,
- >e.g. "list<vector<int>> foobar;" doesn't work.
- ^
- Insert a blank here:
- list<vector<int> >
- In the other case the compiler assumes this is a shift operator.
- >
- > I can get round the problem by "typedef vector<int> iVector;
- >list<iVector> foobar;"
- >
- > Am I doing something wrong in the syntax or is it just one of those
- >things that doesn't work?
- >
-
- --
- email (at work): matti@trabant.bbn.hp.com
-
-